Skip to main content
Feedback

Resource Filtering Policy

The Resource Filtering policy allows you to control access to a specific REST resource.

This policy is used to limit subscriber access to specific resources only.

A typical usage would be to allow access to all paths (/**) but in read-only mode (GET method).

note

You can’t apply the allow list and deny list to the same resource. The allow list takes precedence over the deny list.

Timing

On RequestOn Response
X

Configuration

PropertyRequiredDescriptionTypeDefault
whitelistnoList of allowed resources.array of resources
blacklistnoList of restricted resources.array of resources

A resource is defined as follows:

PropertyRequiredDescriptionTypeDefault
patternyesAnt-style path patterns (Apache Ant).string
methodsnoList of HTTP methods for which filter is applied.array of HTTP methodsAll HTTP methods

Example

"resource-filtering" : {
"whitelist":[
{
"pattern":"/**",
"methods": ["GET"]
}
],

"blacklist": [
{
"pattern": "",
"methods": ["POST"]
}
]
}

Ant style path pattern

URL mapping matches URLs using the following rules:

  • ? matches one character

  • * matches zero or more characters

  • ** matches zero or more directories in a path

Errors

HTTP status codes

CodeMessage
403Access to the resource is forbidden according to resource-filtering rules.
405Method not allowed while accessing this resource.
On this Page